// Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
// This source file is part of the Cangjie project, licensed under Apache-2.0
// with Runtime Library Exception.
//
// See https://cangjie-lang.cn/pages/LICENSE for license information.

#ifndef CANGJIE_MIGRATOR_DEVECO_CJPMPROJECT
#define CANGJIE_MIGRATOR_DEVECO_CJPMPROJECT

#include <vector>
#include <string>

#include "Path.h"

#include "Deveco/CjpmRunParameter.h"

namespace CangjieMigrator::Deveco {

class CjpmProject {
public:
    std::string name;
    Path path;

    CjpmRunParameter runParameter;

    CjpmProject(std::string name, Path path);

    [[nodiscard]] bool HasParameter() const;

    std::string ToString() const;

    static std::string ReadProjectName(const Path &projectToml);
    static std::vector<CjpmProject> GetAllFrom(const Path &directory);
};

} // namespace CangjieMigrator::Deveco

#endif // CANGJIE_MIGRATOR_DEVECO_CJPMPROJECT
